export class Decode {
  private style: {
    [key: string]: string;
  } = {};
  private action: string[] = [];
  constructor(msg: string) {
    const strip = JSON.parse(msg) as { style: string; action: string };
    this.style = JSON.parse(strip.style);
    this.action = JSON.parse(strip.action);
  }

  public getStyle() {
    return this.style;
  }

  public getAction() {
    return this.action;
  }

  public clear() {
    console.log("clear decoder....");
    this.style = {};
    this.action = [];
  }
}
